<!DOCTYPE html>
<html>

<head>
    <title>AxureShop &#8211; 注册</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link media="all" type="text/css" rel="stylesheet"
        href="https://cdn7.axureshop.com/wp-content/plugins/wechat-social-login/assets/css/social.css">
    <script src="https://cdn7.axureshop.com/wp-includes/js/jquery/jquery.js"></script>
    <style type="text/css">
        body {
            background: #f5f5f5;
        }
    </style>
</head>

<body>
    <div class="xh-reglogo"><a href="https://www.axureshop.com/"><img style="max-width: 239px;"
                src="https://cdn7.axureshop.com/wp-content/uploads/2018/06/21085620.png"></a></div>
    <div class="xh-regbox">
        <div class="xh-title" id="form-title">注册</div>
        <form class="xh-form">
            <div class="register fields-error"></div>
            <div class="xh-form-group">
                <label class="required">登录名</label>
                <input type="text" id="register_register_user_login" name="register_user_login" value="" placeholder=""
                    class="form-control " style="" />
            </div>
            <script type="text/javascript">
                (function ($) {
                    $(document).bind('on_form_register_submit', function (e, m) {
                        m.register_user_login = $('#register_register_user_login').val();
                    });

                })(jQuery);
            </script>
            <div class="xh-form-group">
                <label class="required">邮箱</label>
                <input type="text" id="register_register_user_email" name="register_user_email" value="" placeholder=""
                    class="form-control " style="" />
            </div>
            <script type="text/javascript">
                (function ($) {
                    $(document).bind('on_form_register_submit', function (e, m) {
                        m.register_user_email = $('#register_register_user_email').val();
                    });

                })(jQuery);
            </script>
            <div class="xh-form-group">
                <label class="required">手机</label>
                <input type="text" id="register_mobile" name="mobile" value="" placeholder="" class="form-control "
                    style="" />
            </div>
            <script type="text/javascript">
                (function ($) {
                    $(document).bind('on_form_register_submit', function (e, m) {
                        m.mobile = $('#register_mobile').val();
                    });

                })(jQuery);
            </script>
            <div class="xh-input-group">
                <input name="register_mobile_vcode" type="text" id="register_mobile_vcode" maxlength="6"
                    class="form-control" placeholder="短信验证码">
                <span class="xh-input-group-btn"><button type="button" style="min-width:96px;"
                        class="xh-btn xh-btn-default" id="btn-code-register_mobile_vcode">发送验证码</button></span>
            </div>

            <script type="text/javascript">
                (function ($) {
                    if (!$) { return; }

                    $('#btn-code-register_mobile_vcode').click(function () {
                        var $this = $(this);
                        var data = { "action": "xh_social_wechat_social_add_ons_social_mobile", "tab": "mobile_login_vcode", "xh_social_wechat_social_add_ons_social_mobile": "db927f3e6f", "notice_str": "4068721703", "unique": 1, "hash": "a74bfaa244a846e35437a42dbbd05d7a" };
                        $(document).trigger('on_form_register_submit', data);
                        window.xh_social_view.reset();
                        if (window.xh_social_view._mobile_v_loading) {
                            return;
                        }

                        $this.attr('disabled', 'disabled').text('执行中...');

                        $.ajax({
                            url: 'https://www.axureshop.com/wp-admin/admin-ajax.php',
                            type: 'post',
                            timeout: 60 * 1000,
                            async: true,
                            cache: false,
                            data: data,
                            dataType: 'json',
                            success: function (m) {
                                if (m.errcode != 0) {
                                    window.xh_social_view.error(m.errmsg);
                                    $this.removeAttr('disabled').text('发送验证码');
                                    return;
                                }

                                var time = 60;
                                if (window.xh_social_view._interval) {
                                    window.xh_social_view._mobile_v_loading = false;
                                    clearInterval(window.xh_social_view._interval);
                                }

                                window.xh_social_view._mobile_v_loading = true;
                                window.xh_social_view._interval = setInterval(function () {
                                    if (time <= 0) {
                                        window.xh_social_view._mobile_v_loading = false;
                                        $this.removeAttr('disabled').text('发送验证码');
                                        if (window.xh_social_view._interval) {
                                            clearInterval(window.xh_social_view._interval);
                                        }
                                        return;
                                    }
                                    time--;
                                    $this.text('重新发送(' + time + ')');
                                }, 1000);
                            }, error: function (e) {
                                $this.removeAttr('disabled').text('发送验证码');
                                console.error(e.responseText);
                            }
                        });
                    });

                })(jQuery);
            </script>
            <script type="text/javascript">
                (function ($) {
                    $(document).bind('on_form_register_submit', function (e, m) {
                        m.mobile_vcode = $('#register_mobile_vcode').val();
                    });

                })(jQuery);
            </script>
            <div class="xh-form-group">
                <label class="required">密码</label>
                <input type="text" id="register_register_password" name="register_password" value="" placeholder=""
                    class="form-control " style="" />
            </div>
            <script type="text/javascript">
                (function ($) {
                    $(document).bind('on_form_register_submit', function (e, m) {
                        m.register_password = $('#register_register_password').val();
                    });

                })(jQuery);
            </script>
            <div class="xh-input-group" style="width:100%;">
                <input name="captcha" type="text" id="register_captcha" maxlength="6" class="form-control"
                    placeholder="图形验证码">
                <span class="xh-input-group-btn" style="width:96px;"><img
                        style="width:96px;height:35px;border:1px solid #ddd;background:url('https://cdn7.axureshop.com/wp-content/plugins/wechat-social-login/assets/image/loading.gif') no-repeat center;"
                        id="img-captcha-register_captcha" /></span>
            </div>

            <script type="text/javascript">
                (function ($) {
                    if (!$) {
                        return;
                    }

                    window.captcha_register_captcha_load = function () {
                        $('#img-captcha-register_captcha').attr('src', 'https://cdn7.axureshop.com/wp-content/plugins/wechat-social-login/assets/image/empty.png');
                        $.ajax({
                            url: 'https://www.axureshop.com/wp-admin/admin-ajax.php?action=xh_social_captcha&social_key=social_captcha&xh_social_captcha=86cab9d994&notice_str=1702306748&hash=e8dbc3301a89b4dd8d4587ecf863636d',
                            type: 'post',
                            timeout: 60 * 1000,
                            async: true,
                            cache: false,
                            data: {},
                            dataType: 'json',
                            success: function (m) {
                                if (m.errcode == 0) {
                                    $('#img-captcha-register_captcha').attr('src', m.data);
                                }
                            }
                        });
                    };

                    $('#img-captcha-register_captcha').click(function () {
                        window.captcha_register_captcha_load();
                    });

                    window.captcha_register_captcha_load();
                })(jQuery);
            </script>
            <script type="text/javascript">
                (function ($) {
                    $(document).bind('on_form_register_submit', function (e, m) {
                        m.captcha = $('#register_captcha').val();
                    });

                })(jQuery);
            </script>
            <div class="xh-form-group mt10">
                <button type="button" id="btn-register" onclick="window.xh_social_view.register();"
                    class="xh-btn xh-btn-primary xh-btn-block xh-btn-lg">注册</button>
            </div>
            <div class="xh-form-group xh-mT20">
                <label>快速登录</label>
                <div class="xh-social">
                    <a title="手机"
                        href="https://www.axureshop.com/wp-admin/admin-ajax.php?channel_id=social_mobile&action=xh_social_channel&tab=login_redirect_to_authorization_uri&xh_social_channel=3073e6152a&notice_str=0743086271&hash=8b33d3bf4df973d56433b6c2125422f5&redirect_to=https%3A%2F%2Fwww.axureshop.com%2F"
                        class="xh-social-item xh-mobile"></a><a title="QQ"
                        href="https://www.axureshop.com/wp-admin/admin-ajax.php?channel_id=social_qq&action=xh_social_channel&tab=login_redirect_to_authorization_uri&xh_social_channel=3073e6152a&notice_str=3270067481&hash=b41f24cbf3fab0f6759985302d2baeb9&redirect_to=https%3A%2F%2Fwww.axureshop.com%2F"
                        class="xh-social-item xh-qq"></a><a title="微博"
                        href="https://www.axureshop.com/wp-admin/admin-ajax.php?channel_id=social_weibo&action=xh_social_channel&tab=login_redirect_to_authorization_uri&xh_social_channel=3073e6152a&notice_str=6478300217&hash=1df5c87cc91823a088b635d25a8ffcbe&redirect_to=https%3A%2F%2Fwww.axureshop.com%2F"
                        class="xh-social-item xh-weibo"></a>
                </div>
            </div>
        </form>
    </div>
    <div class="xh-user-register"><a href="index.html">首页</a>|<a href="denglu.html">登录</a></div>
</body>
<script type="text/javascript">
    (function ($) {
        if (!window.xh_social_view) {
            window.xh_social_view = {};
        }

        window.xh_social_view.reset = function () {
            $('.xh-alert').empty().css('display', 'none');
        };

        window.xh_social_view.error = function (msg, parent) {
            var s = parent ? (parent + '.fields-error') : '.fields-error';
            $(s).html('<div class="xh-alert xh-alert-danger" role="alert">' + msg + '</div>').css('display', 'block');
        };

        window.xh_social_view.warning = function (msg, parent) {
            var s = parent ? (parent + '.fields-error') : '.fields-error';
            $(s).html('<div class="xh-alert xh-alert-warning" role="alert">' + msg + '</div>').css('display', 'block');
        };

        window.xh_social_view.success = function (msg, parent) {
            var s = parent ? (parent + '.fields-error') : '.fields-error';
            $(s).html('<div class="xh-alert xh-alert-success" role="alert">' + msg + '</div>').css('display', 'block');
        };
    })(jQuery);
</script>
<script type="text/javascript">
    (function ($) {
        $(document).keypress(function (e) {
            if (e.which == 13) {
                window.xh_social_view.register();
            }
        });

        window.xh_social_view.register = function () {
            window.xh_social_view.reset();

            var data = {};
            $(document).trigger('on_form_register_submit', data);

            var validate = {
                data: data,
                success: true,
                message: null
            };

            $(document).trigger('wsocial_pre_register', validate);
            if (!validate.success) {
                window.xh_social_view.warning(validate.message, '.register');
                return false;
            }

            var callback = {
                type: 'register',
                done: false,
                data: data
            };
            $(document).trigger('wsocial_action_before', callback);
            if (callback.done) { return; }

            if (window.xh_social_view.loading) {
                return;
            }
            window.xh_social_view.loading = true;

            $('#btn-register').attr('disabled', 'disabled').text('加载中...');

            jQuery.ajax({
                url: 'https://www.axureshop.com/wp-admin/admin-ajax.php?action=xh_social_add_ons_login&tab=register&xh_social_add_ons_login=3edaed5a0e&notice_str=2014837607&hash=c71096b87795660dd4470c7541e296c6',
                type: 'post',
                timeout: 60 * 1000,
                async: true,
                cache: false,
                data: data,
                dataType: 'json',
                complete: function () {
                    window.xh_social_view.loading = false;
                    $('#btn-register').removeAttr('disabled').text('注册');
                },
                success: function (m) {
                    var callback = {
                        type: 'register',
                        done: false,
                        retry: window.xh_social_view.register,
                        data: m
                    };
                    $(document).trigger('wsocial_action_after', callback);
                    if (callback.done) { return; }

                    if (m.errcode == 0) {
                        window.xh_social_view.success('注册成功！', '.register');
                        location.href = 'https://www.axureshop.com/';
                        return;
                    }

                    if (m.errcode == 1001) {
                        window.xh_social_view.warning(m.errmsg, '.register');
                        location.href = 'https://www.axureshop.com/wp-admin/';
                        return;
                    }

                    window.xh_social_view.error(m.errmsg);
                },
                error: function (e) {
                    window.xh_social_view.error('格式错误，请重新检查！', '.register');
                    console.error(e.responseText);
                }
            });
        };

    })(jQuery);
</script>